Using ownership types to support library aliasing boundaries

نویسندگان

  • Luke Wagner
  • Jaakko Järvi
  • Bjarne Stroustrup
چکیده

This paper describes a library for concurrency used in a 10developer videogame project. The developers were inexperienced, yet there were no problems with data races in the multi-threaded application. We credit this to the explicit representation of ownership in the design of the library. Correct library usage implies aliasing boundaries which bear a strong resemblance to the ownersas-dominators property enforced by ownership types. We explore other situations where analogous aliasing boundaries exist and discuss a family of related libraries that could benefit from a design explicitly representing ownership. The ownership relations in the library currently have no support from the type system. We examine approaches to embed static checking of the aliasing boundaries in our implementation language, C++.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Object Ownership and Containment

Object-oriented programming relies on inter-object aliases to implement data structures and other abstractions. Objects have mutable state, but it is when mutable state interacts with aliasing that problems arise. Through aliasing an object’s state can be changed without the object being aware of the changes, potentially violating the object’s invariants. This problem is fundamentally unresolva...

متن کامل

Object Ownership in Program Verification

Dealing with aliasing is one of the key challenges for the verification of imperative programs. For instance, aliases make it difficult to determine which abstractions are potentially affected by a heap update and to determine which locks need to be acquired to avoid data races. Object ownership was one of the first approaches that allowed programmers to control aliasing and to restrict the ope...

متن کامل

Safe Runtime Downcasts With Ownership Types

The possibility of aliasing between objects constitutes one of the primary challenges in understanding and reasoning about correctness of object-oriented programs. Ownership types provide a principled way of specifying statically enforcable restrictions on object aliasing. Ownership types have been used to aid program understanding and evolution, verify absence of data races and deadlocks in mu...

متن کامل

Generic Ownership: Practical Alias Control in Object-Oriented Programming Languages

Modern object-oriented languages support many techniques that simplify the work of a programmer. Among them is type genericity — an ability to create generic descriptions of algorithms and object structures that will be automatically specialised by supplying type information at run time. On the other hand, object-oriented technologies still suffer from bad effects of aliasing— a case of many ob...

متن کامل

Notions of Aliasing and Ownership

We survey notions of aliasing and ownership. An extreme but conceptually useful model is that of pure linear languages where each object is constructed once and read, being consumed, once. We see more realistic programming languages as relaxing this to allow multiple references to an object (spatial aliasing) or multiple sequenced operations on a single live reference (temporal aliasing) before...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2007